


<html>
<head>
<title>The "Hello World" Application</title>
</head>
<body>
<a href="../index.html"><img src=../../images/PreviousArrow.gif width=26 height=26 align=bottom border=0 alt="Previous | "></a><a
href="../applet/index.html"><img src=../../images/NextArrow.gif width=26 height=26 align=bottom border=0 alt="Next | "></a><a
href="../../index.html"><img src=../../images/WayUpArrow.gif width=26 height=26 align=bottom border=0 alt="Trail Map | "></a><a
href="../index.html"><img src=../../images/getStartedHeader.gif width=26 height=26 align=bottom border=0 alt="Getting Started"></a>
<p>
<hr size=4>

<h1>
     The "Hello World" Application
</h1>
<p>
<blockquote>

<p>
By following the steps on this page,
you can create and use a standalone Java application.

<h4> Create a Java source file 
</h4>
<blockquote>
Create a file named <SAMP>HelloWorldApp.java</SAMP>
with the Java code shown here:
<blockquote>
<pre>
class HelloWorldApp {
    public static void main (String args[]) {
        System.out.println("Hello World!");
    }
}
</pre>
</blockquote>
</blockquote>

<h4>
<A name = "Compile"> Compile the source file</a>
</h4>
<blockquote>
<a href="_compiling.html">Compile the source file</a> using the Java compiler.
<P>
 
If compilation succeeds,
the compiler creates a file named <SAMP>HelloWorldApp.class</SAMP>.
If compilation fails,
make sure you typed in and named the program
exactly as shown above.
</blockquote>

<h4>
Run the application
</h4>
<blockquote>
<a href="_interpreting.html">Run the program</a> using the Java interpreter.
<p>
You should see "Hello World!" displayed
on the standard output.
</blockquote>

<h4>What next?</h4>
<blockquote>
Now you can either:
<ul>
<li> Go to the next lesson, <a href="../applet/index.html">The "Hello World" Applet</a>,
     which steps you through writing an <em>applet</em>.
<li> Learn more about the Java language and about writing applications by going to the
     <a href="../../java/index.html"><em>Writing Java Programs</em></a>
     <a href="../../java/index.html"><img src="../../images/javaIcon.gif" width=20 height=20 border=0></a>
     trail.
</ul>
</blockquote>


</blockquote>
<p>
<hr size=4>
<p>
<a href="../index.html"><img src=../../images/PreviousArrow.gif width=26 height=26 align=top border=0 alt="Previous | "></a><a
href="../applet/index.html"><img src=../../images/NextArrow.gif width=26 height=26 align=top border=0 alt="Next | "></a><a
href="../../index.html"><img src=../../images/WayUpArrow.gif width=26 height=26 align=top border=0 alt="Trail Map | "></a><a
href="../index.html"><img src=../../images/getStartedHeader.gif width=26 height=26 align=top border=0 alt="Getting Started"></a>
</body>
</html>
